Accessibility

How to Add a Close Window or Back Link to a Page

If you want to add "Close Window" or "Back" (as a text link or a button), you will have to add some JavaScript code to your page. In Contribute you cannot edit the HTML source code, so you cannot add JavaScript code to your page by default. However, there is an exception to that rule. In a very few special cases, you can add a few JavaScript commands.

Note: Visitors must have JavaScript enabled in their browser for behaviors such as "Close Window" or "Back" to work. By default, most browsers have JavaScript enabled.

When adding a "Close Window" or "Back" link, you can use either a simple text link or an image link. Either way, it's the same procedure, and I will show you both. For an image-based link, you only have to create an image that matches the design of your website. Or, you can ask your website designer to create an image for you. Another option is to download the images I created for this article. You can download them as part of the Source Files on the first page of this article.

Note: Image-based links added in Contribute currently only work with the Microsoft Internet Explorer browser. You can use a Macromedia Flash button too. Ask your website designer to create a Macromedia Flash button, or download the buttons I created for this article. You can download them as part of the Source Files on the first page of this article.

Macromedia Flash buttons work in many browsers, but Macromedia Flash Player must be installed on the users computer. (Most users have Macromedia Flash Player and are able to view Macromedia Flash content.) In the next steps in this tutorial, I will guide you through creating both a Close Window link and a Back link in text, image, and Macromedia Flash button formats.

Creating the New Page in Contribute

The first step is to create a new page in Contribute using the sample calendar web page for April 2003. To do this, use the Sample Webpages that come with Contribute as follows:

  1. Select File > New Page from the File menu in the upper left corner of Contribute.
  2. Within the New Page dialog that appears, navigate to Sample Web Pages > Calendars and choose April 2003.
  3. You will be prompted to add a title for the page.
  4. Enter "April 2003" and click OK to create the page. The new page will be created as shown in the illustration below.
Figure 1: New page "April 2003"

Figure 1: New page "April 2003"

You will now add and center either the "Close Window" or "Back" link under the calendar. The link should not stick to the calendar, or to the bottom of the page. To avoid this, you will put the link in a 1x1 table (a table with 1 row and 1 column) with a cell padding of 20 pixels and no border and place the table under the calendar. Follow the steps below:

  1. Place your cursor to the right of the calendar and press your Enter/Return key.
  2. Click the table icon table button icon and enter the information into the Table Properties dialog as shown in the illustration below. This will insert a new 1x1 table under the calendar with the following properties: table width: 100 percent, border: 0px, cell padding: 20px, header: none.

    Figure 2: Insert new 1x1 table

    Figure 2: Insert new 1x1 table

  3. From the Table menu, select Table > Cell Properties and click the Table Row and Column Properties tab from the Table Properties dialog that appears.
  4. Change Horizontal alignment to Center, and remove the check next to the Wrap text check box if there is one.

    Note: This is not really necessary for the sample page you are working on, because the calendar is wider than the words "Close Window" or "Back." But if you put the text "Close Window" into a small table cell, this text should not be wrapped.

    Figure 3: Change table cell properties

    Figure 3: Change table cell properties

Now that you have the calendar and the table that will hold the link on the page, you are ready to add the link. As mentioned earlier, this article shows you how to add three types of links: a text link, an image link, and a Macromedia Flash button link. In the next section, you will add a text link.